package rad.framework.uml2.uml.edit.providers.elementItemProvider.namedElement.action.structuredActivity;

import java.util.Collection;
import java.util.List;

import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
import org.eclipse.uml2.uml.StructuredActivityNode;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;

import rad.framework.uml2.uml.edit.UMLEditPlugin;
import rad.framework.uml2.uml.edit.providers.elementItemProvider.namedElement.action.ActionItemProvider;

public class StructuredActivityItemProvider
		extends ActionItemProvider
		implements IEditingDomainItemProvider, IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {

	public StructuredActivityItemProvider(AdapterFactory adapterFactory) {
		super(adapterFactory);
	}

	@Override
	public List getPropertyDescriptors(Object object) {
		if (itemPropertyDescriptors == null) {
			super.getPropertyDescriptors(object);

			addElementImportPropertyDescriptor(object);
			addPackageImportPropertyDescriptor(object);
			addOwnedRulePropertyDescriptor(object);
			addMemberPropertyDescriptor(object);
			addImportedMemberPropertyDescriptor(object);
			addOwnedMemberPropertyDescriptor(object);
			addSubgroupPropertyDescriptor(object);
			addSuperGroupPropertyDescriptor(object);
			addInActivityPropertyDescriptor(object);
			addContainedEdgePropertyDescriptor(object);
			addContainedNodePropertyDescriptor(object);
			addVariablePropertyDescriptor(object);
			addEdgePropertyDescriptor(object);
			addMustIsolatePropertyDescriptor(object);
			addNodePropertyDescriptor(object);
		}
		return itemPropertyDescriptors;
	}

	protected void addElementImportPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Namespace_elementImport_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_Namespace_elementImport_feature", "_UI_Namespace_type"),
				UMLPackage.Literals.NAMESPACE__ELEMENT_IMPORT, true, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addPackageImportPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Namespace_packageImport_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_Namespace_packageImport_feature", "_UI_Namespace_type"),
				UMLPackage.Literals.NAMESPACE__PACKAGE_IMPORT, true, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addOwnedRulePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Namespace_ownedRule_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_Namespace_ownedRule_feature", "_UI_Namespace_type"),
				UMLPackage.Literals.NAMESPACE__OWNED_RULE, true, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addMemberPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Namespace_member_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_Namespace_member_feature", "_UI_Namespace_type"),
				UMLPackage.Literals.NAMESPACE__MEMBER, false, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addImportedMemberPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Namespace_importedMember_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_Namespace_importedMember_feature", "_UI_Namespace_type"),
				UMLPackage.Literals.NAMESPACE__IMPORTED_MEMBER, false, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addOwnedMemberPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Namespace_ownedMember_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_Namespace_ownedMember_feature", "_UI_Namespace_type"),
				UMLPackage.Literals.NAMESPACE__OWNED_MEMBER, false, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addSubgroupPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActivityGroup_subgroup_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_ActivityGroup_subgroup_feature", "_UI_ActivityGroup_type"),
				UMLPackage.Literals.ACTIVITY_GROUP__SUBGROUP, false, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addSuperGroupPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActivityGroup_superGroup_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_ActivityGroup_superGroup_feature", "_UI_ActivityGroup_type"),
				UMLPackage.Literals.ACTIVITY_GROUP__SUPER_GROUP, false, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addInActivityPropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActivityGroup_inActivity_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_ActivityGroup_inActivity_feature", "_UI_ActivityGroup_type"),
				UMLPackage.Literals.ACTIVITY_GROUP__IN_ACTIVITY, true, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addContainedEdgePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActivityGroup_containedEdge_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_ActivityGroup_containedEdge_feature", "_UI_ActivityGroup_type"),
				UMLPackage.Literals.ACTIVITY_GROUP__CONTAINED_EDGE, false, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addContainedNodePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_ActivityGroup_containedNode_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_ActivityGroup_containedNode_feature", "_UI_ActivityGroup_type"),
				UMLPackage.Literals.ACTIVITY_GROUP__CONTAINED_NODE, false, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addVariablePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StructuredActivityNode_variable_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_StructuredActivityNode_variable_feature", "_UI_StructuredActivityNode_type"),
				UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__VARIABLE, true, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addEdgePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StructuredActivityNode_edge_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_StructuredActivityNode_edge_feature", "_UI_StructuredActivityNode_type"),
				UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__EDGE, true, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	protected void addMustIsolatePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StructuredActivityNode_mustIsolate_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_StructuredActivityNode_mustIsolate_feature", "_UI_StructuredActivityNode_type"),
				UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__MUST_ISOLATE, true, ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE, null, null));
	}

	protected void addNodePropertyDescriptor(Object object) {
		itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_StructuredActivityNode_node_feature"),
				getString("_UI_PropertyDescriptor_description", "_UI_StructuredActivityNode_node_feature", "_UI_StructuredActivityNode_type"),
				UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, true, null, null, new String[] { "org.eclipse.ui.views.properties.expert"
				}));
	}

	@Override
	public Collection getChildrenFeatures(Object object) {
		if (childrenFeatures == null) {
			super.getChildrenFeatures(object);
			childrenFeatures.add(UMLPackage.Literals.NAMESPACE__ELEMENT_IMPORT);
			childrenFeatures.add(UMLPackage.Literals.NAMESPACE__PACKAGE_IMPORT);
			childrenFeatures.add(UMLPackage.Literals.NAMESPACE__OWNED_RULE);
			childrenFeatures.add(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__VARIABLE);
			childrenFeatures.add(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__EDGE);
			childrenFeatures.add(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE);
		}
		return childrenFeatures;
	}

	@Override
	protected EStructuralFeature getChildFeature(Object object, Object child) {

		return super.getChildFeature(object, child);
	}

	@Override
	public Object getImage(Object object) {
		return overlayImage(object, getResourceLocator().getImage("full/obj16/StructuredActivityNode"));
	}

	@Override
	public String getText(Object object) {
		return appendLabel(appendType(appendKeywords(new StringBuffer(), object), "_UI_StructuredActivityNode_type"), object).toString();

	}

	@Override
	public void notifyChanged(Notification notification) {
		updateChildren(notification);

		switch (notification.getFeatureID(StructuredActivityNode.class)) {
			case UMLPackage.STRUCTURED_ACTIVITY_NODE__MUST_ISOLATE:
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
				return;
			case UMLPackage.STRUCTURED_ACTIVITY_NODE__ELEMENT_IMPORT:
			case UMLPackage.STRUCTURED_ACTIVITY_NODE__PACKAGE_IMPORT:
			case UMLPackage.STRUCTURED_ACTIVITY_NODE__OWNED_RULE:
			case UMLPackage.STRUCTURED_ACTIVITY_NODE__VARIABLE:
			case UMLPackage.STRUCTURED_ACTIVITY_NODE__EDGE:
			case UMLPackage.STRUCTURED_ACTIVITY_NODE__NODE:
				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
				return;
		}
		super.notifyChanged(notification);
	}

	@Override
	protected void collectNewChildDescriptors(Collection newChildDescriptors, Object object) {
		super.collectNewChildDescriptors(newChildDescriptors, object);

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.NAMESPACE__ELEMENT_IMPORT, UMLFactory.eINSTANCE.createElementImport()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.NAMESPACE__PACKAGE_IMPORT, UMLFactory.eINSTANCE.createPackageImport()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, UMLFactory.eINSTANCE.createConstraint()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, UMLFactory.eINSTANCE.createInteractionConstraint()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, UMLFactory.eINSTANCE.createIntervalConstraint()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, UMLFactory.eINSTANCE.createTimeConstraint()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.NAMESPACE__OWNED_RULE, UMLFactory.eINSTANCE.createDurationConstraint()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__VARIABLE, UMLFactory.eINSTANCE.createVariable()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__EDGE, UMLFactory.eINSTANCE.createControlFlow()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__EDGE, UMLFactory.eINSTANCE.createObjectFlow()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createOpaqueAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createStructuredActivityNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createPin()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createOutputPin()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createInputPin()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createValuePin()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createSendSignalAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createCallOperationAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createCallBehaviorAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createSequenceNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createInitialNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createActivityParameterNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createForkNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createFlowFinalNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createCentralBufferNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createMergeNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createDecisionNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createActivityFinalNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createCreateObjectAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createDestroyObjectAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createTestIdentityAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReadSelfAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReadStructuralFeatureAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createClearStructuralFeatureAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createRemoveStructuralFeatureValueAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createAddStructuralFeatureValueAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReadLinkAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createCreateLinkAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createDestroyLinkAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createClearAssociationAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createBroadcastSignalAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createSendObjectAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createValueSpecificationAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReadVariableAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createClearVariableAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createAddVariableValueAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createRemoveVariableValueAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createRaiseExceptionAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createActionInputPin()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReadExtentAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReclassifyObjectAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReadIsClassifiedObjectAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createStartClassifierBehaviorAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReadLinkObjectEndAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReadLinkObjectEndQualifierAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createCreateLinkObjectAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createAcceptEventAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createAcceptCallAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReplyAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createUnmarshallAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createReduceAction()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createJoinNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createDataStoreNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createConditionalNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createLoopNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createExpansionNode()));

		newChildDescriptors.add(createChildParameter(UMLPackage.Literals.STRUCTURED_ACTIVITY_NODE__NODE, UMLFactory.eINSTANCE.createExpansionRegion()));
	}

	@Override
	public String getCreateChildText(Object owner, Object feature, Object child, Collection selection) {
		final Object childFeature = feature;
		final Object childObject = child;

		final boolean qualify = childFeature == UMLPackage.Literals.ACTION__LOCAL_PRECONDITION || childFeature == UMLPackage.Literals.ACTION__LOCAL_POSTCONDITION || childFeature == UMLPackage.Literals.NAMESPACE__OWNED_RULE;

		if (qualify) {
			return getString("_UI_CreateChild_text2",
					new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
		}
		return super.getCreateChildText(owner, feature, child, selection);
	}

	@Override
	public ResourceLocator getResourceLocator() {
		return UMLEditPlugin.INSTANCE;
	}

}
